DROP TABLE IF EXISTS jms_ods.yl_lmdm_sys_tail_code_staff;
CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_tail_code_staff(
 ID bigint comment "ID",  --NUMBER(11)
 TAIL_CODE string comment "单元区域编码（关联字段）",  --VARCHAR2(20)
 TAIL_ID bigint comment "单元区域ID（关联字段）",  --NUMBER(11)
 STAFF_ID bigint comment "业务员ID",  --NUMBER(11)
 STAFF_CODE string comment "业务员编码",  --VARCHAR2(20)
 STAFF_NAME string comment "业务员名称"  --VARCHAR2(60)
 )
 COMMENT '单元区域-员工关联表'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_tail_code_staff'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

MSCK REPAIR TABLE jms_ods.yl_lmdm_sys_tail_code_staff;